VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Player"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private m_lpDDS As CDXVBSurface
Public x As Long, y As Long, yvel As Long

Private Sub Class_Initialize()
    Set m_lpDDS = New CDXVBSurface
End Sub

Public Sub Init(nx As Long, ny As Long, FN As String, screen As CDXVBScreen)
    m_lpDDS.Create FN, screen
    x = nx
    y = ny
    yvel = 0
End Sub

Public Sub SetVel(Amt)
    yvel = Amt
End Sub

Public Sub Move()
    y = y + yvel
    If y < 10 Then yvel = 0: y = 10
    If y > 380 - m_lpDDS.m_PixelHeight Then yvel = 0: y = 380 - m_lpDDS.m_PixelHeight
End Sub

Public Sub Draw(BackS As IDirectDrawSurface2)
    m_lpDDS.Blit x, y, BackS
End Sub
